package ysq.xyg.web.model.po;

import lombok.NoArgsConstructor;

import lombok.Data;
import ysq.xyg.base.util.BaseConstant;
import ysq.xyg.base.util.BaseUtil;
import ysq.xyg.sys.model.po.SysUser;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 业务模块-社团信息实体类
 *
 * @author shengQiang yu
 * @date 2019-5-13 9:19:17
 */
@Data
@NoArgsConstructor
@Table(name = "xyg_web_corporation")
public class WebCorporation implements Serializable{

	/**
     * 主键
     */ 
	@Id
	private String id;
	
	/**
     * 会员id
     */ 
	@Column(name = "member_id")
	private String memberId;
	
	/**
     * 社团名称
     */ 
	@Column(name = "name")
	private String name;
	
	/**
     * 社团人数
     */ 
	@Column(name = "num")
	private String num;
	
	/**
     * 申请日期
     */ 
	@Column(name = "apply_time")
	private Date applyTime;
	
	/**
     * 服务范围
     */ 
	@Column(name = "service_tenet")
	private String serviceTenet;
	
	/**
     * 服务宗旨
     */ 
	@Column(name = "service_area")
	private String serviceArea;
	
	/**
     * 审核状态:1、待审核，2、审核通过,3、审核未通过
     */ 
	@Column(name = "status")
	private String status;
	
	/**
     * 审核时间
     */ 
	@Column(name = "check_time")
	private Date checkTime;
	
	/**
     * 审核备注
     */ 
	@Column(name = "check_remark")
	private String checkRemark;
	
	/**
     * 删除标注:1、正常，2、删除
     */ 
	@Column(name = "remove_tag")
	private String removeTag;
	
	/**
     * 创建时间
     */ 
	@Column(name = "create_time")
	private Date createTime;
	
	/**
     * 创建人
     */ 
	@Column(name = "create_user")
	private String createUser;
	
	/**
     * 修改时间
     */ 
	@Column(name = "update_time")
	private Date updateTime;
	
	/**
     * 修改人
     */ 
	@Column(name = "update_user")
	private String updateUser;
	@Transient
	private String userList;

	public WebCorporation(SysUser sysUser) {
		this.id= BaseUtil.uId();
		this.removeTag= BaseConstant.BASE_REMOVE_TAG_NORMAL;
		this.createTime = new Date();
		this.createUser = sysUser.getId();
		this.updateTime = new Date();
		this.updateUser = sysUser.getId();
	}
}